/*
* @Author: Administrator
* @Date:   2018-01-11 14:09:06
* @Last Modified by:   Administrator
* @Last Modified time: 2018-01-27 12:34:50
*/
import TopicListStore from './topic_list'
import TopicsDetailStore from './topic_detail'
import UserStore from './user_store'
import storeStucture from '../constant/stotore_structure'

let initialStore
try {
  initialStore = window.__INITIAL__STOTE__ || storeStucture
} catch (e) { // eslint-disable-line
  initialStore = storeStucture
}
const createStores = () => {
  const stores = {
    topicList: new TopicListStore(initialStore.topicList),
    topicDetail: new TopicsDetailStore(initialStore.topicDetail),
    user: new UserStore(initialStore.user),
  }
  return stores
}

export default createStores
